﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using XWord.Fundamental.Domain;

namespace XWord.GUI.Presenters.Words
{
    public class EtymaTypeCoverter : IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var str = string.Empty;
            var et = (EtymaType)value;
            switch (et)
            {
                case EtymaType.None:
                    break;
                case EtymaType.PreFix:
                    str = "前缀";
                    break;
                case EtymaType.Etymon:
                    str = "词根";
                    break;
                case EtymaType.Suffix:
                    str = "后缀";
                    break;
            }
            return str;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
